From 78c201d8d9d2f3ec07f6ea36201977846e29ccd9 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Feb 2026 12:42:42 -0800 Subject: homepage design and currency toggling --- src/routes/(app)/send/invoice/[id]/+page.svelte | 27 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'src/routes/(app)/send/invoice/[id]') diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte index 187c13c5..9cc2f0a6 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.svelte +++ b/src/routes/(app)/send/invoice/[id]/+page.svelte @@ -5,10 +5,11 @@ import { onDestroy, onMount } from "svelte"; import { t } from "$lib/translations"; import { goto, invalidateAll } from "$app/navigation"; - import { pin } from "$lib/store"; + import { fiat as fiatStore, pin } from "$lib/store"; import { enhance } from "$app/forms"; import Amount from "$comp/Amount.svelte"; - import Avatar from "$comp/Avatar.svelte"; import Numpad from "$comp/Numpad.svelte"; + import Avatar from "$comp/Avatar.svelte"; + import Numpad from "$comp/Numpad.svelte"; import Spinner from "$comp/Spinner.svelte"; import { page } from "$app/stores"; import { @@ -143,12 +144,15 @@ {i.quantity} {i.name} -
- {f(i.price * i.quantity, invoice.currency)} -
-
- {sat(btc(i.price * i.quantity, invoice.rate))} -
+ {#if $fiatStore} +
+ {f(i.price * i.quantity, invoice.currency)} +
+ {:else} +
+ {sat(btc(i.price * i.quantity, invoice.rate))} +
+ {/if} {/each} {/if} @@ -189,7 +193,12 @@ type="button" class="btn !w-auto grow" onclick={setMax} - onkeydown={setMax}>Max ⚡️{s(balance)}{#if $fiatStore} + Max {f((balance * rate) / sats, currency, locale)} + {:else} + Max ⚡️{s(balance)} + {/if}